package cn.minhx.domain.trade.adapter.repostitory;

import cn.minhx.domain.trade.moedel.aggregate.GroupBuyOrderAggregate;
import cn.minhx.domain.trade.moedel.aggregate.GroupBuyTeamSettlementAggregate;
import cn.minhx.domain.trade.moedel.entity.GroupBuyActivityEntity;
import cn.minhx.domain.trade.moedel.entity.GroupBuyTeamEntity;
import cn.minhx.domain.trade.moedel.entity.MarketPayOrderEntity;
import cn.minhx.domain.trade.moedel.entity.NotifyTaskEntity;
import cn.minhx.domain.trade.moedel.valobj.GroupBuyProgressVO;
import java.util.List;

/**
 * 交易仓储服务接口
 *
 * @author min
 */
public interface ITradeRepository {

	MarketPayOrderEntity queryMarketPayOrderEntityByOutTradeNo(String userId, String outTradeNo);

	GroupBuyProgressVO queryGroupBuyProgress(String teamId);

	MarketPayOrderEntity lockMarketPayOrder(GroupBuyOrderAggregate groupBuyOrderAggregate);

	GroupBuyActivityEntity queryGroupBuyActivityEntityByActivityId(Long activityId);

	Integer queryOrderCountByActivityId(Long activityId, String userId);

	GroupBuyTeamEntity queryGroupBuyTeamByTeamId(String teamId);

	boolean settlementMarketPayOrder(GroupBuyTeamSettlementAggregate groupBuyTeamSettlementAggregate);

	boolean isSCBlackIntercept(String source, String channel);

	List<NotifyTaskEntity> queryUnExecutedNotifyTaskList();

	List<NotifyTaskEntity> queryUnExecutedNotifyTaskList(String teamId);

	int updateNotifyTaskStatusSuccess(String teamId);

	int updateNotifyTaskStatusError(String teamId);

	int updateNotifyTaskStatusRetry(String teamId);
}
